/**
 * Created by L.jp
 * Description:
 * User: DO
 * Date: 2021-10-03
 * Time: 23:15
 */
public class Leapyear {
    public static void main(String[] args) {
        int count=0;
        for(int n=1000;n<=2000;n++) {
            if ((n % 4 == 0 && n % 100 != 0) || (n % 400 == 0)) {
                System.out.print(n+" ");
                count++;
            }
        }
        System.out.println();
        System.out.println("1000到2000之间的闰年有："+count+"个");
    }
}
